﻿@{
    ViewBag.Title = "大文件分块上传";
}
<link href="/css/bootstrap.css" rel="stylesheet" />
<script src="/scripts/jquery-1.10.2.min.js"></script>
<script src="/scripts/bootstrap.js"></script>
<script src="/js/UploadJs.js"></script>
<div class="jumbotron">
    <h1>ASP.NET MVC 大文件分块上传</h1>
    <p class="lead">本代码使用HTML5特性，使用js对文件先进行分块，然后异步上传至服务器</p>   
</div>
<div class="row">   
        <div class="col-lg-4"></div>
        <div class="col-lg-4">
            <input type="text" value="请选择文件" size="20" name="upfile" id="upfile" readonly="readonly" style="border:1px dotted #ccc">
            <input type="button" value="浏览" onclick="path.click()" style="border:1px solid #ccc;background:#fff">
            <input type="file" id="path" style="display:none" multiple="multiple" onchange="upfile.value=this.value">
            <div class="progress" style="margin-top:10px;">
                <div class="progress-bar" style="width:0%"></div>              
            </div>
            <button type="button" id="file" onclick="UploadStart()" style="border:1px solid #ccc;background:#fff">开始上传</button>
            <span id="uploadmsg" style="color:red"></span>
        </div>
        <div class="col-lg-4"></div>
</div>